<?php
class App_View_Helper_Window extends Zend_View_Helper_Abstract
{
    public function window(array $options = array())
    {
        $viewRenderer = 
            Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); 
        $front = $viewRenderer->view; 
        
        $front->headLink()
             ->appendStylesheet(
                 DIRECTORY_SEPARATOR . "library" .
                 DIRECTORY_SEPARATOR . "css" .
                 DIRECTORY_SEPARATOR . "window.css"
               );
        
        if(!empty($options['title'])) {

            return '<div class="distance"></div>' .
                   '<div class="window">' .
                   '<div class="window_title">' . $options['title'] . '</div>' .
                   '<div class="window_content">';
        } else {
            return '</div>' .
                   '</div>';
        }
    }
}